#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
#include <string>
using namespace std;

vector<string> vs;
char s[100];

int main()
{
    while (scanf("%s", s) != EOF)
    {
        string str(s);
        vs.push_back(str);
    }

     reverse(vs.begin(), vs.end());
    //reverse(vs.begin(), vs.end());

    for (auto& e : vs)
        cout << e << ' ';

    return 0;
}
